package com.openbravo.pos.printer.ticket;

import java.awt.Font;
import java.awt.geom.AffineTransform;

public class MyPrinterState
{
  private int m_iSize;

  public MyPrinterState(int paramInt)
  {
    this.m_iSize = paramInt;
  }

  public int getLineMult()
  {
    return getLineMult(this.m_iSize);
  }

  public static int getLineMult(int paramInt)
  {
    switch (paramInt)
    {
    case 0:
    case 2:
      return 1;
    case 1:
    case 3:
      return 2;
    }
    return 1;
  }

  public Font getFont(Font paramFont, int paramInt)
  {
    AffineTransform localAffineTransform;
    Font localFont;
	switch (this.m_iSize)
    {
    case 0:
      localFont = paramFont;
      break;
    case 2:
      localAffineTransform = AffineTransform.getScaleInstance(2.0D, 1.0D);
      localAffineTransform.preConcatenate(paramFont.getTransform());
      localFont = paramFont.deriveFont(localAffineTransform);
      break;
    case 1:
      localAffineTransform = AffineTransform.getScaleInstance(1.0D, 2.0D);
      localAffineTransform.preConcatenate(paramFont.getTransform());
      localFont = paramFont.deriveFont(localAffineTransform);
      break;
    case 3:
      localAffineTransform = AffineTransform.getScaleInstance(2.0D, 2.0D);
      localAffineTransform.preConcatenate(paramFont.getTransform());
      localFont = paramFont.deriveFont(localAffineTransform);
      break;
    default:
      localFont = paramFont;
    }
      localFont = localFont.deriveFont((paramInt & 0x1) != 0 ? 1 : paramFont.getStyle());
    return localFont;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.printer.ticket.MyPrinterState
 * JD-Core Version:    0.6.0
 */